﻿using UnityEngine;

namespace GGameFramework.Core.Pool
{
    public class GameObjectPoolable : MonoBehaviour, IPoolable
    {
        // 简化PoolKey，主要用于调试和标识

        public virtual void OnSpawn()
        {
            // 从池中取出时激活对象
            gameObject.SetActive(true);
        }

        public virtual void OnRecycle()
        {
            // 回收到池中时关闭对象
            gameObject.SetActive(false);
        }

        public void Clear()
        {
            
        }
    }
}